<template>
  <div id="studentResume">resume</div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import { StudentControllerService } from "../../../generated";
import { useStore } from "vuex";

let name = ref();
let fileResume = ref();

onMounted(() => {
  loadData();
});

const store = useStore();

const loadData = async () => {
  // const loginsUserId = sessionStorage.getItem("LoginUserId");
  const res = await StudentControllerService.studentByIdUsingGet(
    store.state.user.loginUser.userId
  );
  name = res.data.resume;
  const downRes = await StudentControllerService.downloadUsingGet(name);
  fileResume.value = downRes.data;
  console.log(downRes);
};
</script>

<style scoped>
#studentResume {
}
</style>
